package com.kaily.timemanager.fragment;

import android.view.View;

import com.app.common.util.Logger;
import com.app.common.util.Tools;
import com.app.common.view.slidebar.SideBarLayout;
import com.kaily.timemanager.R;
import com.kaily.timemanager.data.contract.TaskContract;
import com.kaily.timemanager.data.presenter.TaskPresenterImpl;
import com.kaily.timemanager.obj.Task;
import com.kaily.timemanager.obj.TaskClass;
import com.kaily.timemanager.view.ITaskClassActionListener;
import com.kaily.timemanager.view.TaskClassLayout;
import com.kaily.timemanager.view.TaskInfoLayout;
import com.kaily.timemanager.view.TaskLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.InjectView;


/**
 * Created by zhoulikai on 17/2/25.
 */

public class IndexNewFragment extends AppBaseFragment implements TaskContract.View {

    private final String TAG = "IndexNewFragment";

    private TaskContract.Presenter presenter;
    private List<TaskClass> taskClasses;

    @Override
    public int initLayoutId() {
        return R.layout.fragment_new_index;
    }

    @Override
    public void initPage(View view) {
        super.initPage(view);
        presenter = new TaskPresenterImpl(this.getActivity(), this);
        presenter.getAllTask(this.getActivity());
    }


    @Override
    public void setAllTask(List<TaskClass> task) {
        Logger.d(TAG, ">>>>>>>>>>>" + task);
        if (task == null) {
            task = new ArrayList<>();
        }
        taskClasses = task;

    }

    @Override
    public void notificationTaskClass(TaskContract.Presenter.TaskOp taskOp, TaskClass taskClass) {

    }

    @Override
    public void notificationTask(TaskContract.Presenter.TaskOp taskOp, Task task) {

    }


}
